Skip to content

feat(ublue-bling): clean up fish script#291

Merged
castrojo merged 1 commit intoprojectbluefin:mainfrom
AlexNPavel:update-bling-fish
Apr 24, 2026
Merged

feat(ublue-bling): clean up fish script#291
castrojo merged 1 commit intoprojectbluefin:mainfrom
AlexNPavel:update-bling-fish

Conversation

@AlexNPavel
Copy link
Copy Markdown
Contributor

@AlexNPavel AlexNPavel commented Apr 23, 2026

Add a variety of fixes to the bling.fish script to bring it up to par with bling.sh.

  • only blingify in an interactive terminal
  • add no-source-twice fix
  • Simplify command existence checks
  • Add command existence check for bat
  • Add direnv and mise
  • Use command init fish | source pattern (every tool has that pattern as the correct way to set up the tool in their respective documentations).
  • Use abbr -a instead of alias by default. Abbr is generally preferred over alias in fish. This does result in a functional change though: abbr expands in the terminal. This is one of the reasons they are preferred (you can see the exact command instead of the real command being effecively hidden), but some people may prefer the simpler aliases, so I added a flag similar to what mise has to disable abbr and go back to alias if a user prefers that.

@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Apr 23, 2026
@dosubot dosubot Bot added area/bling Anything to do with motd, terminal bling, charm and gum things kind/enhancement New feature, don't implement without a spec and consensus labels Apr 23, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the Fish shell configuration by introducing a bling_abbr helper function to manage aliases and abbreviations and updating the initialization logic for several CLI tools like direnv, starship, and mise. The review identifies two significant issues: the bling_abbr function pollutes the global namespace and should be cleaned up or renamed, and the alias definitions should be moved inside the interactive status check to ensure consistent behavior and avoid side effects in non-interactive scripts.

Comment thread system_files/shared/usr/share/ublue-os/bling/bling.fish Outdated
Comment thread system_files/shared/usr/share/ublue-os/bling/bling.fish Outdated
Add a variety of fixes to the bling.fish script to bring it up to par
with bling.sh.

- only blingify in an interactive terminal
- add no-source-twice fix
- Simplify command existence checks
- Add command existence check for bat
- Add direnv and mise
- Use `command init fish | source` pattern (every tool has that pattern
  as the correct way to set up the tool in their respective
  documentations).
- Use `abbr -a` instead of `alias` by default. Abbr is generally
  preferred over alias in fish. This does result in a functional change
  though: `abbr` expands in the terminal. This is one of the reasons
  they are preferred (you can see the exact command instead of the real
  command being effecively hidden), but some people may prefer the
  simpler aliases, so I added a flag similar to what `mise` has to
  disable `abbr` and go back to `alias` if a user prefers that.
@AlexNPavel
Copy link
Copy Markdown
Contributor Author

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the bling.fish script to improve performance and idiomatic usage. Key changes include wrapping the script in an interactive status check, adding a double-sourcing guard, and introducing a helper function to support both abbreviations and aliases. Additionally, it replaces command evaluation with direct sourcing for several tools and adds support for direnv and mise. I have no feedback to provide.

@castrojo
Copy link
Copy Markdown
Contributor

I don't use fish but this seems sane to me, thank you!

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Apr 23, 2026
@castrojo castrojo enabled auto-merge April 23, 2026 22:05
@castrojo castrojo added this pull request to the merge queue Apr 24, 2026
Merged via the queue into projectbluefin:main with commit 93d75c3 Apr 24, 2026
1 check passed
@AlexNPavel AlexNPavel deleted the update-bling-fish branch April 24, 2026 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/bling Anything to do with motd, terminal bling, charm and gum things kind/enhancement New feature, don't implement without a spec and consensus lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants